<!DOCTYPE html>
<html lang="">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-title" content="App" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  <meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">


  <title>
    <%= htmlWebpackPlugin.options.title %>
  </title>

  <style>
    * {
      outline: none;
      font-family: "PF";
    }

    html {
      margin: 0;
      padding: 0;
      padding-top: constant(safe-area-inset-top);
      padding-bottom: constant(safe-area-inset-bottom);
      /* 兼容 iOS < 11.2 */
      padding-top: env(safe-area-inset-top);
      padding-bottom: env(safe-area-inset-bottom);
      /* 兼容 iOS >= 11.2 */
      height: 100%;
      display: flex;
      flex-direction: column;
      background-color: #ffffff;
    }

    body {
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    #app {
      height: 100%;
    }

    .pageapp {
      height: 100%;
      overflow: hidden;
    }
  </style>
  <script>
    window.onload = function () {
      navigator.globalization.getPreferredLanguage(onSuccess, onError);
      function onSuccess(lang) {
        if (lang.value.indexOf('zh') == -1) {
          //en
          localStorage.setItem("lang", "en")
        } else {
          localStorage.setItem("lang", "zh")
        }
      }
      function onError() {
        console.info("获取语言失败");
      }
    }
  </script>
</head>

<body>
  <div id="app"></div>
</body>
<script src="cordova.js"></script>
<script src="js/index.js"></script>
<script>

</script>

</html>